Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore selection correctly even when wrapping asymmetrically #32

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Restore selection correctly even when wrapping asymmetrically #32

merged 1 commit into from
Mar 8, 2024

Conversation

N-Shar-ma
Copy link
Contributor

Fixes: #31

@@ -121,6 +121,8 @@ for (const type of ['textarea', 'input', 'contenteditable'] as const) {
const field = getField(type, 'W{O}A');
wrapFieldSelection(field, '[', ']');
t.equal(getState(field), 'W[{O}]A');
wrapFieldSelection(field, '<p>', '</p>');
t.equal(getState(field), 'W[<p>{O}</p>]A');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent example

@timabbott
Copy link

Any chance that this can be included in a release soon? It'd save us from having to temporarily revert the upgrade from 3.2.0 in Zulip if we knew a release will be out in the next week or so.

@fregante fregante merged commit 78ffd71 into fregante:main Mar 8, 2024
4 checks passed
@fregante fregante added the bug Something isn't working label Mar 8, 2024
@N-Shar-ma N-Shar-ma deleted the restore-selection branch March 11, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants